<?php
//session 比较常用的是存放用户的登录状态
session_start();

if(!isset($_SESSION["uid"])){
    
echo "<script>Window.location='index.php'</script>" ;
}

?>
<html>
    <head>
        <title>甜品商城</title>
        <meta charset="UTF-8">
        <style>
            .box{
                float: left;
                position: absolute;
                transform: translate(150%,50%);
                
            }
            .ttl{
                color: deeppink;
                font-size: 30px;
                float: left;
            }
            .dh a{
                list-style: none;
                float: right;
                font-size: 20px;
                margin-left: 12px;               
            }
            .dh span{
                position: absolute;
                transform: translate(20000%,10%);
            }
            .zh{
                    
                width: 1000px;
                height: 667px;
                position: absolute;
                transform: translate(40%,50%);
            }
            .dhl a{
                font-size: 30px;
                position: absolute;
                transform: translate(100%,100%);
                margin-left: -150px;
                
            }
            .tp  img{
                position: absolute;
                transform: translate(-40%,30%);
            }
            .tp1  img{
                position: absolute;
                transform: translate(65%,28%);
            }
             .tp2  img{
                position: absolute;
                transform: translate(175%,30%);
            }
            .tp3  img{
                position: absolute;
                transform: translate(280%,30%);
            }
            .tp4  img{
                position: absolute;
                transform: translate(-40%,160%);
            }
            .tp5  img{
                position: absolute;
                transform: translate(65%,155%);
            }
            .tp6  img{
                position: absolute;
                transform: translate(170%,160%);
            }
            .tp7  img{
                position: absolute;
                transform: translate(275%,160%);
            }
            .ym{
                 position: absolute;
                transform: translate(250%,3500%);
            }
            .tp ul li1 a{
                position: absolute;
                transform: translate(-40%,1500%);
            }
             .tp ul li2 a{
                position: absolute;
                transform: translate(-40%,1650%);
                text-decoration:none;
                color: red;
            }
            .tp1 ul li1 a{
                position: absolute;
                transform: translate(180%,1500%);
            }
             .tp1 ul li2 a{
                position: absolute;
                transform: translate(350%,1650%);
                text-decoration:none;
                color: red;
            }
             .tp2 ul li1 a{
                position: absolute;
                transform: translate(370%,1500%);
               
            }
             .tp2 ul li2 a{
                position: absolute;
                transform: translate(700%,1650%);
                text-decoration:none;
                color: red;
            }
             .tp3 ul li1 a{
                position: absolute;
                transform: translate(570%,1500%);
                
            }
             .tp3 ul li2 a{
                position: absolute;
                transform: translate(920%,1650%);
                text-decoration:none;
                color: red;
            }
            .tp4 ul li1 a{
                position: absolute;
                transform: translate(-40%,3000%);
            }
             .tp4 ul li2 a{
                position: absolute;
                transform: translate(-40%,3200%);
                text-decoration:none;
                color: red;
            }
            .tp5 ul li1 a{
                position: absolute;
                transform: translate(170%,3000%);
            }
            .tp5 ul li2 a{
                position: absolute;
                transform: translate(290%,3200%);
                text-decoration:none;
                color: red;
            }
            .tp6 ul li1 a{
                position: absolute;
                transform: translate(370%,3000%);
            }
            .tp6 ul li2 a{
                position: absolute;
                transform: translate(610%,3200%);
                text-decoration:none;
                color: red;
            }
            .tp7 ul li1 a{
                position: absolute;
                transform: translate(650%,3000%);
            }
            .tp7 ul li2 a{
                position: absolute;
                transform: translate(920%,3200%);
                text-decoration:none;
                color: red;
            }
            body{
                width:3010px;
                height:2200px;
                 background-repeat: no-repeat;
                 background-image: url(90.jfif);
               background-size: 100%;
               
            }
            
        </style>
    </head>
    
    

    
    
    <body>
        <div class="zh">
            <div class="ttl">甜甜啦</div>
            
            <div class="box">
                <form action="search.php" method="get">
                <input type="text" class="input" name="key" placeholder="请输入商品">
                <input type="submit" value="搜索" class="button">
                </form>
            </div>
            
            <div class="dh">
                <a href="login1.php" >登录</a>
                <span>|</span>
                <a href="register.php" >注册</a>
            </div>
            <div class="dhl">
                
                    <a href="">首页</a>
                    <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <a href="">我的订单</a>
            </div>
            
                   
               
                <div class="tp">
                    <a href="index.php"></a>
                        <img src="1.png">
                        <ul>
                            <li1><a href="order.php">产品名称:瑞士卷</a></li1>
                            <li2><a href="order.php">价格:20元</a></li2>
                            
                        </ul>
                        

                </div>
                <div class="tp1">
                    <a href="index.php"></a>
                        <img src="2.png">
                        <ul>
                            <li1><a href="order.php">产品名称:奶油小方</a></li1>
                            <li2><a href="order.php">价格:2.6元</a></li2>
                            
                        </ul>

                </div>
                <div class="tp2">
                    <a href="index.php"></a>
                        <img src="3.png">
                        <ul>
                            <li1><a href="order.php">产品名称:焦糖布丁</a></li1>
                            <li2><a href="order.php">价格:9.8元</a></li2>
                            
                        </ul>

                </div>
                 <div class="tp3">
                    <a href="index.php"></a>
                        <img src="4.png">
                        <ul>
                            <li1><a href="order.php">产品名称:是草莓呀</a></li1>
                            <li2><a href="order.php">价格:6.00元</a></li2>
                            
                        </ul>

                </div>

                 <div class="tp4">
                    <a href="order.php"></a>
                        <img src="5.png">
                         <ul>
                            <li1><a href="order.php">产品名称:野人牧坊</a></li1>
                            <li2><a href="order.php">价格:8.00元</a></li2>
                            
                        </ul>

                </div>
                <div class="tp5">
                        <a href="index.php"></a>
                            <img src="6.png">
                             <ul>
                            <li1><a href="order.php">产品名称:杨枝甘露</a></li1>
                            <li2><a href="order.php">价格:5.80元</a></li2>
                            
                        </ul>

                </div>
                <div class="tp6">
                        <a href="index.php"></a>
                            <img src="7.png">
                             <ul>
                            <li1><a href="order.php">产品名称:牛奶蛋糕</a></li1>
                            <li2><a href="order.php">价格:3.60元</a></li2>
                            
                        </ul>

                </div>
                <div class="tp7">
                        <a href="index.php"></a>
                            <img src="8.png">
                             <ul>
                            <li1><a href="order.php">产品名称:冰淇淋</a></li1>
                            <li2><a href="order.php">价格:8.60元</a></li2>
                            
                        </ul>

                </div>
            
            <div class="ym">
                <button onclick="previousPage()">上一页</button>>
                <button onclick="nextPage()">下一页</button>>
                
            </div>
    </div>
            <script>        
                var currentPage=1;
                
                function previousPage(){
                    if(currentPage>1){
                     currentPage--;   
                    }
                }
                function nextPage(){
                    currentPage++;
                }
            </script>
        
    </body>
</html>
